package JavaExercise;

import java.util.Random;
import java.util.Scanner;


public class StarStar {
    static  int f;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入你要打的行数");
        int n = sc.nextInt();
        Random rand = new Random();
        int rand1 = rand.nextInt(100);
        f=n;
        Star(n);
    }
    public static void Star(int n) {
        int i = 0;
        for (; i < n - 1; i++) {
            System.out.print(" ");
        }
        for (int z = f * 2 -1- 2*i; z > 0; z--) {
            System.out.print("*");
        }
        System.out.println(" ");
        n--;
        if (n > 0)
            Star(n);
    }
}
